package com.chub.resp;

import lombok.Getter;

/**
 * @author : chub
 * @version : V1.0.0
 * @fileName : REnum.java
 * @description : 响应码枚举
 * @createTime : 2022-04-23 10:22
 */
@Getter
public enum REnum {
    SUCCESS(true, 200, "成功"),
    FAIL(false, 500, "失败"),
    UNKNOWN_ERROR(false, 201, "未知错误"),
    PARAM_ERROR(false, 202, "参数错误"),
    NULL_POINT(false, 203, "空指针异常"),
    HTTP_CLIENT_ERROR(false, 204, "http客户端异常");

    // 响应是否成功
    private Boolean success;
    // 响应状态码
    private Integer code;
    // 响应信息
    private String message;

    REnum(boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }
}
